<?php
/*
 * emarket - a website to create your own online-shop.  
 * Copyright (C) 2009  Frédéric Delorme
 *
 * This file is part of emarket.
 *
 * emarket is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * emarket is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with emarket.  If not, see <http://www.gnu.org/licenses/>.
 *
 * To contact me: frederic.delorme@gmail.com
 * to see some information on te project : http://code.google.col/p/os-emarket/
 *
 */
global $framewok;
require_once($framework."/persistence/entity.php");

/**
 * 
 * @author frederic
 *
 */
class Parameter extends Entity{
	public $group;
	public $key;
	public $value;
	
	/**
	 * return a boolean status based on the inserted enable value. 
	 * @return unknown_type
	 */
	public function isEnabled(){
		return ($this->value=="on" || 
				$this->value="true" || 
				$this->value="enable" || 
				$this->value=="1"
			?true
			:false);
	}
	/**
	 * return a boolean status base on the inserted disable value. 
	 * @return unknown_type
	 */
	public function isDisabled(){
		return !$this->isEnabled();
	}
} 
?>